﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.model.Instance;

namespace l1cs.server.clientpackets
{
    public class C_LeaveParty : ClientBasePacket
    {
        private const String _C_LEAVE_PARTY = "[C] C_LeaveParty";
        private static Logger _log = Logger.getLogger( typeof( C_LeaveParty ).FullName );

        public C_LeaveParty( byte[] decrypt, ClientThread client )
            : base( decrypt )
        {

            L1PcInstance player = client.getActiveChar();
            if ( player.isInParty() ) // パーティー中
            {
                player.getParty().leaveMember( player );
            }
        }

        override
        public String getType()
        {
            return _C_LEAVE_PARTY;
        }
    }
}